import 'package:base_flutter/base_flutter.dart';
import 'package:ls_work/net/api/http_api.dart';
import 'package:ls_work/net/post_request.dart';

import '../../net/response/nurse_record_detail_response.dart';

class NurseRecordModel extends BaseMvvmModel{
  @override
  void onCleared() {
  }
  
  Future<NurseRecordDetailResponse> getNurseDetail(String id) async {
    var map = {
      "id":id
    };
    
    var data = await HttpGo.instance.postData(HttpApi.nurseRecordDetail,data: map,options: PostRequest.urlencodedHeader);
    if("0"==data['code'].toString()){
      return NurseRecordDetailResponse.fromJson(data['data']);
    }else{
      throw data['msg'];
    }
  }
}